
<table class="box-vang5" cellpadding="0" cellspacing="0" width="100%">
        <tbody><tr class="light">
          <td class="text-top">.:. Danh sách phiếu chi</td>
        </tr>
      </tbody></table>
      <table class="box-vang5" cellpadding="0" cellspacing="0" width="100%">
        <tbody><tr class="light"> 
          <td class="t-l"></td>
          <td class="t-c"></td>
          <td class="t-r"></td>
        </tr>
        <tr class="light">
          <td class="c-l"></td>
          <td class="c-c" valign="top">
 
<?php 
	
	$sqlstring="select  
						*
					from 
						thu_chi 
					where type=2
					order by id desc
					";
	$qr1=mysql_query($sqlstring); 
	
  ?>
<table id="box-quick" class="box-quick" border="0" cellpadding="5" cellspacing="0" width="100%">
          <tbody><tr id="title">
           	<td width="3%">STT</td>
            <td width="10%">Ngày chi</td>
            <td width="15%">Khách hàng</td>
            <td width="10%">Số tiền</td>
            <td width="20%">Diễn giải</td>
            <td width="10%">Ngày cập nhật</td>
            <td width="10%">Người cập nhật</td>
            <td width="5%">Thao tác</td>
          </tr>
         <?php 
		 $i=1;
		 	while($row=mysql_fetch_array($qr1)) 
			{
				
		 ?>
           <tr class="light"  id="value" style="cursor:pointer;" onmouseover="mouse_den(this)" onmouseout="mouse_di(this)" bgcolor="">
           	<td align="center" style="border-left:1px solid #ccc"><?php echo $i++;?> </td>
             <td align="center" >
           		<?php echo $row['time'];?>
           </td>
             <td align="center">
             	<?php 
				$sql_kh=mysql_query("select id,name_kh,name_com from customers where id='".$row['kh_id']."'");
				$row_kh=mysql_fetch_array($sql_kh);
			 	echo $row_kh['name_com']; echo $row_kh['name_kh'];
				?>
             </td>
             <td align="center"> <?php echo number_format($row['sotien'],',','.','.');?> </td>
          
            <td align="left">
            	<?php echo $row['description'];?>
            </td>
            <td align="center"><?php echo date('d/m/Y',$row['time_update']);?> </td>
             <td align="center">
			 		<?php
						$nql_id=$row['user_update']; 
						$nql_name=catchinfor($nql_id,'account_id','account_name','tb_account_admin');
							echo $nql_name;
					?>
              </td>
             <td align="center">          	
				<a onclick="window.location='index.php?tn=contract&hd=phieuchi_edit&id=<?php echo $row['id'];?>';"><img width="16" align="absmiddle" src="../skins/images/edit.png"></a>
													
				<a onclick="if(confirm('Bạn muốn xóa phiếu chi này không?')){window.location='index.php?tn=contract&hd=ThuChi_del&id=<?php echo $row['id'];?>';}"><img width="16" align="absmiddle" src="../skins/images/del.png"></a>
													
                &nbsp;
                            
             </td>
          </tr>
       
         <?php }?>

        </tbody>
	</table>
  </td>

 <td class="c-r"></td>
        </tr>
        <tr class="light">
          <td class="b-l"></td>
          <td class="b-c"></td>
          <td class="b-r"></td>
        </tr>
      </tbody></table>